package cc.angis.xiugallery.data;

import java.text.SimpleDateFormat;
import java.util.Calendar;

public class CommentData {
	
	private int id;
	
	private String commentId;
	
	private int postId;
	
	private long time;
	
	private int type;
	
	private String content;
	
	private String author;
	
	private String avatar;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getPostId() {
		return postId;
	}

	public void setPostId(int postId) {
		this.postId = postId;
	}

	public long getTime() {
		return time;
	}

	public void setTime(long time) {
		this.time = time;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public String getAvatar() {
		return avatar;
	}

	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}
	
	public String getShowTime(){
		Calendar calendar = Calendar.getInstance();
		calendar.setTimeInMillis(time);
		String formatter = "MM-dd HH:mm";
		return new SimpleDateFormat(formatter).format(calendar.getTime());
	}

	public String getCommentId() {
		return commentId;
	}

	public void setCommentId(String commentId) {
		this.commentId = commentId;
	}

}
